import service from "@/utils/request"

import LoginWork from "@/utils/LoginWork"

// 品牌查询
export const BrandMaterQuery = (style:string) => {
    return service.get<any,any>(`/BrandMaterialDefinition/getBrandMaterialList?style=${style}`)
}

// 品牌添加
export const AddBrand = (style:string) => {
    return LoginWork.post<any,any>(`/BrandMaterialDefinition/addBrandMaterial?style=${style}`)
}

export const AddBrandDate = () => {
    return service.get<any,any>(`/BrandMaterialDefinition/getBrandTypeList`)
}

// 品牌删除
export const deleteBrand = (style:string) => {
    return LoginWork.post<any,any>(`/BrandMaterialDefinition/deleteBrandMaterial?style=${style}`)
}

// 包材分类明细查询
export const packingMaterialsQuery = (style:string) => {
    return service.get<any,any>(`/BrandMaterialDefinition/getPackageMaterialByStyle?style=${style}`)
}

// 包材分类明细删除
export const deletepackingMaterials = (style:string,parms:any) => {
    return LoginWork.post<any,any>(`/BrandMaterialDefinition/deletePackagMaterial?style=${style}`,parms)
}

// 材料明细查询
export const MaterialDetailnquiry = (style:string,parms:any) => {
    return service.post<any,any>(`/BrandMaterialDefinition/getMaterialDetailList?style=${style}`,parms)
}

//包材分类明细新增
export const Adddeletepacking = (style:string,parms:any) => {
    return LoginWork.post<any,any>(`/BrandMaterialDefinition/addPackagMaterial?style=${style}`,parms)
}

// 材料明细删除
export const deleteMaterialDetail = (style:string,mtlNo:string,parms:any) => {
    return LoginWork.post<any,any>(`/BrandMaterialDefinition/deleteMaterialDetail?style=${style}&mtlNo=${mtlNo}`,parms)
}

// 装箱方式
export const PackingMethod = () => {
    return service.get<any,any>(`/BrandMaterialDefinition/addBoxingStyle`)
}

// 选择材料查询
export const selectMaterials = (parms:any) => {
    return service.post<any,any>(`/BrandMaterialDefinition/getBrandMaterialList`,parms)
}

// 选择材料新增
export const SelectMaterialNew = (style:string,mtlNo:string,parms:any) => {
    return LoginWork.post<any,any>(`/BrandMaterialDefinition/deleteMaterialDetail?mtlNo=${mtlNo}&style=${style}`,parms)
}

// 选择材料删除
export const DeleteSelectMaterialNew = (mtlNo:string) => {
    return LoginWork.post<any,any>(`/BrandMaterialDefinition/deleteMaterialDataFiling?mtlNo=${mtlNo}`)
}


// 选择材料删除
export const deleteMtlName = (mtlNo:string) => {
    return LoginWork.post<any,any>(`/BrandMaterialDefinition/deleteMaterialDataFiling?mtlNo=${mtlNo}`)
}

// 材料明细新增
export const MaterialDetailsAdded = (parms:any) => {
    return LoginWork.post<any,any>(`/BrandMaterialDefinition/addBatchMaterialDetail`,parms)
}

// 选择分类明细查询
export const SelectackingMaterialClassification = (style:any) => {
    return service.post<any,any>(`/BrandMaterialDefinition/getPackagMaterialList?style=${style}`)
}

// 整个品牌删除
export const deleteWholeBrand = (style:string) => {
    return LoginWork.get<any,any>(`/BrandMaterialDefinition/deleteAllBrandMaterial?style=${style}`)
}

// 装箱方式查询
export const PackingMethodQuery = () => {
    return service.get<any,any>(`/BrandMaterialDefinition/addBoxingStyle`)
}

// 定义装箱方式
export const DefinePackingMode = (parms:any) => {
    return LoginWork.post<any,any>(`/BrandMaterialDefinition/addBoxingStyle`,parms)
}